{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "链式调用的结果可以用更加清晰的方法得到。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 不好的方式\n",
    "bad_style = obj.method1().method2().method3()\n",
    "\n",
    "# 请注意，如果我们在括号内进行方法链接，则不需要使用 \\ 字符进行显式换行\n",
    "good_style = (\n",
    "    TestClientAPI().method1()\n",
    "    .method2()\n",
    "    .method3()\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
